
<!DOCTYPE html>
<html lang="en" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>搭建博客 - Hexo</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="Fechin,"> 
    <meta name="description" content="搭建博客教程1.npm install hexo-cli -g  全局安装hexo2.hexo-v   检查版本号3.npm i nrm -g4.npm config list(metrics-re,"> 
    <meta name="author" content="John Doe"> 
    <link rel="alternative" href="atom.xml" title="Hexo" type="application/atom+xml"> 
    <link rel="icon" href="/img/favicon.png"> 
    
    
    
    <meta name="twitter:card" content="summary"/>
    <meta name="twitter:title" content="搭建博客 - Hexo"/>
    <meta name="twitter:description" content="搭建博客教程1.npm install hexo-cli -g  全局安装hexo2.hexo-v   检查版本号3.npm i nrm -g4.npm config list(metrics-re,"/>
    
    
    
    
    <meta property="og:site_name" content="Hexo"/>
    <meta property="og:type" content="object"/>
    <meta property="og:title" content="搭建博客 - Hexo"/>
    <meta property="og:description" content="搭建博客教程1.npm install hexo-cli -g  全局安装hexo2.hexo-v   检查版本号3.npm i nrm -g4.npm config list(metrics-re,"/>
    
<link rel="stylesheet" href="/css/diaspora.css">

<meta name="generator" content="Hexo 5.4.1"></head>

<body class="loading">
    <span id="config-title" style="display:none">Hexo</span>
    <div id="loader"></div>
    <div id="single">
    <div id="top" style="display: block;">
    <div class="bar" style="width: 0;"></div>
    <a class="iconfont icon-home image-icon" href="javascript:;" data-url="http://example.com"></a>
    <div title="播放/暂停" class="iconfont icon-play"></div>
    <h3 class="subtitle">搭建博客</h3>
    <div class="social">
        <div>
            <div class="share">
                <a title="获取二维码" class="iconfont icon-scan" href="javascript:;"></a>
            </div>
            <div id="qr"></div>
        </div>
    </div>
    <div class="scrollbar"></div>
</div>

    <div class="section">
        <div class="article">
    <div class='main'>
        <h1 class="title">搭建博客</h1>
        <div class="stuff">
            <span>二月 21, 2022</span>
            

        </div>
        <div class="content markdown">
            <h2 id="搭建博客教程"><a href="#搭建博客教程" class="headerlink" title="搭建博客教程"></a>搭建博客教程</h2><p>1.npm install hexo-cli -g  全局安装hexo<br>2.hexo-v   检查版本号<br>3.npm i nrm -g<br>4.npm config list(metrics-registry = “<a target="_blank" rel="noopener" href="https://registry.npmjs.org/&quot;">https://registry.npmjs.org/&quot;</a>)<br>5.nrm ls  用来管理npm下载的地址<br>6.nrm use taobao </p>
<h2 id="创建博客"><a href="#创建博客" class="headerlink" title="创建博客"></a>创建博客</h2><p>1创建一个文件夹，在路径里直接cmd，输入hexo init docs<br>2.cd docs文件夹<br>3.npm run server 启动项目<br>4.会出现localhost地址复制到浏览器打开<br>5.在里面下载主题<br>6.将创建文件拖到vscode中修改_config.yml 里面的theme修改成自己下载的主题文件名<br>7.生成文章页面   hexo new post -p  tools/搭建博客教程<br>8.在scaffolds中加入categories   下次创建项目直接形成</p>
<h2 id="git创建步骤"><a href="#git创建步骤" class="headerlink" title="git创建步骤"></a>git创建步骤</h2><p>1.登录gitee<br>2.点击加号新建仓库，输入仓库名称，路径自动匹配，底下私有,开源都行，最后点击创建<br>3.进入之后点击ssh初始化代码<br>4.在vscode中新建一个.gitignore中填写需要过滤的文件夹<br>5.在创建的dosc文件夹中 执行windows+r输入cmd进去黑窗口，输入git init<br>6.git add .<br>7.git commit -m “first commit”<br>8.git remote add origin <a target="_blank" rel="noopener" href="https://gitee.com/sun1230/sundy-homework.git">https://gitee.com/sun1230/sundy-homework.git</a><br>9.git push -u origin “master”<br>10.设置秘钥在个人设置中找到公钥，在dosc这个文件中打开黑窗口输入自己的邮箱，如：<br>ssh-keygen -t rsa -C “自己邮箱” （qq邮箱）<br>11.连续点击三次回车键即可，在自己的c盘中点击用户/自己的名字/.ssh中点击第二个id_rsa.pub用文档或者其他编辑器打开，复制秘钥，设置公钥备注，将公钥的编码粘贴点击提交，在输入自己的git密码</p>
<h2 id="之后每次上创建"><a href="#之后每次上创建" class="headerlink" title="之后每次上创建"></a>之后每次上创建</h2><p>1.git add .<br>2.git commit -m “1.22zuoye”<br>3.git push</p>

            <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
            <audio id="audio" loop="1" preload="auto" controls="controls" data-autoplay="false">
                <source type="audio/mpeg" src="">
            </audio>
            
                <ul id="audio-list" style="display:none">
                    
                        
                            <li title="0" data-url="http://link.hhtjim.com/163/425570952.mp3"></li>
                        
                    
                        
                            <li title="1" data-url="http://link.hhtjim.com/163/425570952.mp3"></li>
                        
                    
                </ul>
            
        </div>
        
    <div id="gitalk-container" class="comment link"
		data-enable="false"
        data-ae="false"
        data-ci=""
        data-cs=""
        data-r=""
        data-o=""
        data-a=""
        data-d="false"
    >查看评论</div>


    </div>
    
</div>


    </div>
</div>
</body>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/typed.js"></script>
<script src="/js/diaspora.js"></script>


<link rel="stylesheet" href="/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/photoswipe/default-skin/default-skin.css">


<script src="/photoswipe/photoswipe.min.js"></script>
<script src="/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>






</html>
